package com.example.data.factory.entity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lhy
 * @since 2025-03-03
 */
@Getter
@Setter
@ApiModel(value = "Interface对象", description = "")
public class Interface implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("接口id，自动递增")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("接口名称，不可重复")
    private String interfaceName;

    @ApiModelProperty("接口分类id")
    private Long classifyId;

    @ApiModelProperty("接口来源（如数据服务、指标管理、决策引擎）")
    private String source;

    @ApiModelProperty("接口描述")
    private String description;

    @ApiModelProperty("接口协议（http，https）")
    private String protocol;

    @ApiModelProperty("接口ip端口")
    private String ipAndProt;

    @ApiModelProperty("接口路径")
    private String path;

    @ApiModelProperty("请求方式（get，post）")
    private String request;

    @ApiModelProperty("输入参数")
    private String inputParam;

    @ApiModelProperty("输入参数body")
    private String inputParamBody;

    @ApiModelProperty("输出参数body")
    private String outputParam;

    @ApiModelProperty(value = "超时时间，单位秒，默认30s", example = "30")
    private String timeout;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("0-未发布（草稿），1-已发布，2-已停用")
    private Byte status;

    @ApiModelProperty("删除状态 0：未删除， 1：已删除")
    private Byte deleted;

    @ApiModelProperty("创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "YYYY-MM-DD")
    private LocalDateTime createTime;
    @ApiModelProperty("更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "YYYY-MM-DD")
    private LocalDateTime updateTime;
    @ApiModelProperty("储存用户选择的目录名称")
    private String categoryName;

}
